package com.itnoob.command1.example.service;

/**
 * 接受者类:优惠券服务
 * @author zhoujun
 * @date 2025/3/18 23:14
 */
public class CouponService {

    public String getCoupon(int userId) throws InterruptedException {
        String result = "9折优惠券";
        //模拟网络延迟,休眠2s
        Thread.sleep(2000);
        System.out.println("userId" + userId + ",Coupon name: " + result);
        return  result;
    }
}
